<?php

namespace wxml\controllers;

use Yii;
use yii\web\Controller;
use wxml\models\product\Product;

class SiteController extends Controller {
    public $layout = false;

    /**
     * @inheritdoc
     */
    public function actions() {
        return ['error' => ['class' => 'yii\web\ErrorAction',], 'captcha' => ['class' => 'yii\captcha\CaptchaAction',
                                                                              'fixedVerifyCode' => YII_ENV_TEST ? 'testme' : null,],];
    }

    /**
     * Displays homepage.
     *
     * @return string
     */
    public function actionIndex() {
        $product=new Product();
        $res=$product->fetchProduct();
        return $res;
    }


    public function actionError() {
        return $this->render("error");
    }

}
